package cn.com.nes.site.entity.em;

import java.util.HashMap;
import java.util.Map;

public enum CompanyTypeEnum {

    _00("00", "创今"),
    _01("01", "厂商"),
    _02("02", "代理商"),
    _03("03", "子公司"),
    ;

    private String key;

    private String value;

    CompanyTypeEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static String getVal(String key) {
        Map<String, String> map = new HashMap<>();
        for (CompanyTypeEnum value : values()) {
            map.put(value.getKey(), value.getValue());
        }
        return map.get(String.valueOf(key));
    }

}
